﻿using FreeSql.DataAnnotations;

namespace KJSyncXP.Sqlite.Model
{
    /// <summary>
    /// 用户-权限关联表实体类
    /// </summary>
    [Table(Name = "user_permission")] // 对应数据库表名
    public class Up
    {
        /// <summary>
        /// 内部标识（主键，自增）
        /// </summary>
        [Column(Name = "id", IsPrimary = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 用户全局标识
        /// </summary>
        [Column(Name = "useruuid", StringLength = 120)]
        public string Useruuid { get; set; }

        /// <summary>
        /// 权限全局标识
        /// </summary>
        [Column(Name = "puuid", StringLength = 120)]
        public string Puuid { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [Column(Name = "description", StringLength = 120)]
        public string Description { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column(Name = "remark", StringLength = 150)]
        public string Remark { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Column(Name = "username", StringLength = 120)]
        public string Username { get; set; }

        /// <summary>
        /// 权限名
        /// </summary>
        [Column(Name = "pname", StringLength = 120)]
        public string Pname { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column(Name = "ptype", StringLength = 100)]
        public string Ptype { get; set; }


        /// <summary>
        /// 权限类型（1:权限，2:角色）
        /// </summary>
        [Column(Name = "atype")]
        public int Atype { get; set; }
    }
}